package com.example.aopdemo.apect;

import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.stereotype.Component;

@Aspect
@Component
@Slf4j
public class MyApectDemo {
    @After("@annotation(com.example.aopdemo.annotation.MyApect)")
    public void doAfter() {
        log.info("MyApectDemo -> after");
    }


    @Before("@annotation(com.example.aopdemo.annotation.MyApect)")
    public void doBefore() {
        log.info("MyApectDemo -> Before");

    }
}
